package com.aabte.design2.structural.proxy;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class Application {

    public static void main(String[] args) {

        RemotePartyTVLib partyTVService = new ThirdPartyTV();
        // 创建代理
        CachedTV cachedTV = new CachedTV(partyTVService);
        TVManager tvManager = new TVManager(cachedTV);

        tvManager.reactOnUserInput(1);
        System.out.println("------------------------------");
        tvManager.reactOnUserInput(1);
    }

}
